/// code : 200
/// msg : "success"
/// data : [{"id":114,"name":"某某产品一","settlementType":1,"price":null,"linkUrl":"https://www.163.com/","sort":null,"imgUrl":"http://china-loan-market.oss-cn-beijing.aliyuncs.com/img/71E684EE441140FABAEBF6E726DA0864.png","amount":222.0,"isRedirect":0,"redirectTimes":0}]

class PopUpsBean {
  PopUpsBean({
    this.code,
    this.msg,
    this.data,
  });

  PopUpsBean.fromJson(dynamic json) {
    code = json['code'];
    msg = json['msg'];
    if (json['data'] != null) {
      data = [];
      json['data'].forEach((v) {
        data?.add(PopUpsInfo.fromJson(v));
      });
    }
  }

  num? code;
  String? msg;
  List<PopUpsInfo>? data;

  PopUpsBean copyWith({
    num? code,
    String? msg,
    List<PopUpsInfo>? data,
  }) =>
      PopUpsBean(
        code: code ?? this.code,
        msg: msg ?? this.msg,
        data: data ?? this.data,
      );

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['code'] = code;
    map['msg'] = msg;
    if (data != null) {
      map['data'] = data?.map((v) => v.toJson()).toList();
    }
    return map;
  }
}

/// id : 114
/// name : "某某产品一"
/// settlementType : 1
/// price : null
/// linkUrl : "https://www.163.com/"
/// sort : null
/// imgUrl : "http://china-loan-market.oss-cn-beijing.aliyuncs.com/img/71E684EE441140FABAEBF6E726DA0864.png"
/// amount : 222.0
/// isRedirect : 0
/// redirectTimes : 0

class PopUpsInfo {
  PopUpsInfo({
    this.id,
    this.name,
    this.settlementType,
    this.price,
    this.linkUrl,
    this.sort,
    this.imgUrl,
    this.amount,
    this.isRedirect,
    this.redirectTimes,
  });

  PopUpsInfo.fromJson(dynamic json) {
    id = json['id'];
    name = json['name'];
    settlementType = json['settlementType'];
    price = json['price'];
    linkUrl = json['linkUrl'];
    sort = json['sort'];
    imgUrl = json['imgUrl'];
    amount = json['amount'];
    isRedirect = json['isRedirect'];
    redirectTimes = json['redirectTimes'];
  }

  num? id;
  String? name;
  num? settlementType;
  dynamic price;
  String? linkUrl;
  dynamic sort;
  String? imgUrl;
  num? amount;
  num? isRedirect;
  num? redirectTimes;

  PopUpsInfo copyWith({
    num? id,
    String? name,
    num? settlementType,
    dynamic price,
    String? linkUrl,
    dynamic sort,
    String? imgUrl,
    num? amount,
    num? isRedirect,
    num? redirectTimes,
  }) =>
      PopUpsInfo(
        id: id ?? this.id,
        name: name ?? this.name,
        settlementType: settlementType ?? this.settlementType,
        price: price ?? this.price,
        linkUrl: linkUrl ?? this.linkUrl,
        sort: sort ?? this.sort,
        imgUrl: imgUrl ?? this.imgUrl,
        amount: amount ?? this.amount,
        isRedirect: isRedirect ?? this.isRedirect,
        redirectTimes: redirectTimes ?? this.redirectTimes,
      );

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['id'] = id;
    map['name'] = name;
    map['settlementType'] = settlementType;
    map['price'] = price;
    map['linkUrl'] = linkUrl;
    map['sort'] = sort;
    map['imgUrl'] = imgUrl;
    map['amount'] = amount;
    map['isRedirect'] = isRedirect;
    map['redirectTimes'] = redirectTimes;
    return map;
  }
}
